package abc.dev.auth.vo;

import abc.base.BaseEntity;
import abc.converter.BaseExcelConverter;
import abc.model.IEntity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
* <p>
    * 在线账号 (显示视图对象)
    * </p>
*
* @author linlurui
* @since 2022-09-27
*/
@Data
@Accessors(chain = false)
@Component
@Schema(name = "OnlineVo", description = "在线账号")
public class OnlineVo2 extends BaseEntity<OnlineVo2> implements IEntity<OnlineVo2> {

    /**
     * 登录账号
     */
    @Schema(name = "account", description = "登录账号")
    @TableField("account")
    @ExcelProperty(value = "登录账号")
    private String account;

    /**
     * 登录平台
     */
    @Schema(name = "platform", description = "登录平台")
    @TableField("platform")
    @ExcelProperty(value = "登录平台")
    private String platform;

    /**
     * 当前Token
     */
    @Schema(name = "token", description = "当前Token")
    @TableField("token")
    @ExcelProperty(value = "当前Token")
    private String token;

    /**
     * 登录时间
     */
    @Schema(name = "loginTime", description = "登录时间")
    @TableField("login_time")
    @DateTimeFormat
    @ExcelProperty(value = "登录时间", converter = BaseExcelConverter.LocalDateTimeConverter.class)
    private Date loginTime;

}
